﻿package net.wangit.view.tree;

import net.wangit.util.Checker;

public class TreeConfig {

	private static final String DEFAULT_CSS = "/common/tree/tree.css";
	private String domain;
	private boolean visible;
	private String treeId;
	private String factory;
	private String writer;
	private int type;
	private String skin;
	private String divAttribute;
	private String defaultTarget;
	private boolean defaultOpen;
	private String imagePath;
	private boolean showLines;
	private boolean showIcons;
	private boolean cacheEnabled;
	private boolean supportCheck;
	private boolean supportCheckAll;
	private boolean supportMove;
	private boolean supportAdd;
	private String moveBeforeInterceptor;
	private String moveAfterInterceptor;
	private boolean filter;

	public TreeConfig() {
		visible = true;
	}

	public String getFactory() {
		return factory;
	}

	public void setFactory(String factory) {
		this.factory = factory;
	}

	public String getWriter() {
		return writer;
	}

	public void setWriter(String writer) {
		this.writer = writer;
	}

	public String getTreeId() {
		return treeId;
	}

	public void setTreeId(String treeId) {
		this.treeId = treeId;
	}

	public boolean isCacheEnabled() {
		return cacheEnabled;
	}

	public void setCacheEnabled(boolean cacheEnabled) {
		this.cacheEnabled = cacheEnabled;
	}

	public String getDivAttribute() {
		return divAttribute;
	}

	public void setDivAttribute(String divAttribute) {
		this.divAttribute = divAttribute;
	}

	public boolean isDefaultOpen() {
		return defaultOpen;
	}

	public void setDefaultOpen(boolean defaultOpen) {
		this.defaultOpen = defaultOpen;
	}

	public boolean isShowIcons() {
		return showIcons;
	}

	public void setShowIcons(boolean showIcons) {
		this.showIcons = showIcons;
	}

	public boolean isShowLines() {
		return showLines;
	}

	public void setShowLines(boolean showLines) {
		this.showLines = showLines;
	}

	public String getDomain() {
		return domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getSkin() {
		return Checker.isEmpty(skin) ? TreeConfig.DEFAULT_CSS : skin;
	}

	public void setSkin(String skin) {
		this.skin = skin;
	}

	public String getImagePath() {
		return imagePath;
	}

	public void setImagePath(String imagePath) {
		this.imagePath = imagePath;
	}

	public boolean isSupportCheck() {
		return supportCheck;
	}

	public void setSupportCheck(boolean supportCheck) {
		this.supportCheck = supportCheck;
	}

	public boolean isFilter() {
		return filter;
	}

	public void setFilter(boolean filter) {
		this.filter = filter;
	}

	public String getMoveAfterInterceptor() {
		return moveAfterInterceptor;
	}

	public void setMoveAfterInterceptor(String moveAfterInterceptor) {
		this.moveAfterInterceptor = moveAfterInterceptor;
	}

	public String getMoveBeforeInterceptor() {
		return moveBeforeInterceptor;
	}

	public void setMoveBeforeInterceptor(String moveBeforeInterceptor) {
		this.moveBeforeInterceptor = moveBeforeInterceptor;
	}

	public boolean isSupportAdd() {
		return supportAdd;
	}

	public void setSupportAdd(boolean supportAdd) {
		this.supportAdd = supportAdd;
	}

	public boolean isSupportCheckAll() {
		return supportCheckAll;
	}

	public void setSupportCheckAll(boolean supportCheckAll) {
		this.supportCheckAll = supportCheckAll;
	}

	public boolean isSupportMove() {
		return supportMove;
	}

	public void setSupportMove(boolean supportMove) {
		this.supportMove = supportMove;
	}

	public boolean isVisible() {
		return visible;
	}

	public void setVisible(boolean visible) {
		this.visible = visible;
	}

	public String getDefaultTarget() {
		return defaultTarget;
	}

	public void setDefaultTarget(String defaultTarget) {
		this.defaultTarget = defaultTarget;
	}
}
